<template>
  <div>
    <h2>
      <img src="./assets/img/index/index (1).png" alt @click="goBack" v-show="isshow" />
      {{$route.meta.title}}
    </h2>
    <router-view class="pad"></router-view>
  </div>
</template>

<script>
export default {
  data(){
    return {}
  },
  computed: {
    // console.log(this.$route.path);
    isshow() {
      if (this.$route.path == "/index/store"||this.$route.path == "/index/cate"||this.$route.path == "/index/shop"||this.$route.path == "/index/mine") {
        return false;
      } else {
        return true;
      }
      
    }
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    }
  }
};
</script>

<style scoped>
.pad {
  margin-top: 1rem;
}
h2 {
  height: 1rem;
  background: #ff603f;
  color: white;
  text-align: center;
  line-height: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
}
img {
  width: 0.18rem;
  height: 0.34rem;
  position: absolute;
  top: 0.33rem;
  left: 0.2rem;
}
</style>